package com.tsll.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName purchaseinfo
 */
public class PurchaseInfo implements Serializable {
    /**
     * 采购信息编号
     */
    private Integer id;

    /**
     * 采购时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date purchaseData;

    /**
     * 采购计划
     */
    private String play;


    /**
     * 预申请金额
     */
    private Double sal;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 采购人员
     */
    private Integer staffid;

    /**
     * 审核状态
     */
    private Integer examinestatus;

    /**
     * 采购人员
     */
    private Staff staff;

    /**
     * 驳回信息
     */
    private String reject;




    private static final long serialVersionUID = 1L;


    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    /**
     * 采购信息编号
     */
    public Integer getId() {
        return id;
    }

    /**
     * 采购信息编号
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 计划采购的时间
     */
    public Date getPurchaseData() {
        return purchaseData;
    }

    /**
     * 计划采购的时间
     */
    public void setPurchaseData(Date purchaseData) {
        this.purchaseData = purchaseData;
    }

    /**
     * 采购计划
     */
    public String getPlay() {
        return play;
    }

    /**
     * 采购计划
     */
    public void setPlay(String play) {
        this.play = play;
    }

    /**
     * 状态
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 状态
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 采购人员id
     */
    public Integer getStaffid() {
        return staffid;
    }

    /**
     * 采购人员id
     */
    public void setStaffid(Integer staffid) {
        this.staffid = staffid;
    }

    /**
     * 审核状态
     */
    public Integer getExaminestatus() {
        return examinestatus;
    }

    /**
     * 审核状态
     */
    public void setExaminestatus(Integer examinestatus) {
        this.examinestatus = examinestatus;
    }


    public Double getSal() {
        return sal;
    }

    public void setSal(Double sal) {
        this.sal = sal;
    }

    public String getReject() {
        return reject;
    }

    public void setReject(String reject) {
        this.reject = reject;
    }


    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PurchaseInfo other = (PurchaseInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPurchaseData() == null ? other.getPurchaseData() == null : this.getPurchaseData().equals(other.getPurchaseData()))
            && (this.getPlay() == null ? other.getPlay() == null : this.getPlay().equals(other.getPlay()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getStaffid() == null ? other.getStaffid() == null : this.getStaffid().equals(other.getStaffid()))
            && (this.getExaminestatus() == null ? other.getExaminestatus() == null : this.getExaminestatus().equals(other.getExaminestatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPurchaseData() == null) ? 0 : getPurchaseData().hashCode());
        result = prime * result + ((getPlay() == null) ? 0 : getPlay().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getStaffid() == null) ? 0 : getStaffid().hashCode());
        result = prime * result + ((getExaminestatus() == null) ? 0 : getExaminestatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", purchaseData=").append(purchaseData);
        sb.append(", play=").append(play);
        sb.append(", status=").append(status);
        sb.append(", staffid=").append(staffid);
        sb.append(", examinestatus=").append(examinestatus);
        sb.append(", reject=").append(reject);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}